package com.tourism.dao;

import com.tourism.entity.AttractionCollect;
import com.tourism.entity.AttractionCollectQuery;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;

@Mapper
public interface AttractionCollectDao {
    /**
     * 新增景点收藏
     *
     * @param attraction
     * @return
     */
    boolean addAttractionCollect(AttractionCollect attraction);

    /**
     * 根据id查找景点收藏
     *
     * @param id
     * @return
     */
    AttractionCollect getAttractionCollectById(Long id);

    /**
     * /**
     * 根据id查找景点收藏
     *
     * @param userId
     * @param attractionId
     * @return
     */
    Long getDataByUserIdAndAttractionId(Long userId, Long attractionId);

    /**
     * 根据id删除景点收藏
     *
     * @param id
     * @return
     */
    boolean deleteAttractionCollectById(Long id);

    /**
     * 获取景点收藏列表
     *
     * @param query
     * @return
     */
    List<AttractionCollect> getAttractionCollectList(AttractionCollectQuery query);
}
